package com.hinner.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: PengFei.He
 * @Date: 2025/1/20 23:02
 * @Function:
 */
@Data
@NoArgsConstructor
public class PageBean {

    private int pageNum;
    private int pageSize;

    private int start; //起始页

    private String query; //查询参数

    public int getStart(){
        return (pageNum-1)*pageSize;
    }

    public PageBean(int pageNum, int pageSize, String query) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.query = query;
    }
    public PageBean(int pageNum, int pageSize) {
        super();
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }
}
